//
//  SCPaiXuView.m
//  NBProduct
//
//  Created by ping on 15/11/3.
//  Copyright (c) 2015年 ping. All rights reserved.
//

#import "SCPaiXuView.h"

@implementation SCPaiXuView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self initView];
    }
    return self;
}

-(void)initView{
    
   
    self.backgroundColor = FenLeiBeiJingHuiSe;
    
    
    _zongHeBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth/3, self.height)];
    [_zongHeBtn setTitle:@"综合" forState:UIControlStateNormal];
    _zongHeBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [_zongHeBtn setTitleColor:ZONGCOLOR forState:UIControlStateNormal];
    [self addSubview:_zongHeBtn];
    
    _xiaoLiangbtn = [[UIButton alloc]initWithFrame:CGRectMake(_zongHeBtn.right, 0, KScreenWidth/3, self.height)];
    [_xiaoLiangbtn setTitle:@"销量" forState:UIControlStateNormal];
    _xiaoLiangbtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [_xiaoLiangbtn setTitleColor:MaintextColor forState:UIControlStateNormal];
    
    _xiaoLiangimageView = [[UIImageView alloc]initWithFrame:CGRectMake(_zongHeBtn.center.x + 20 * _kscW,( _xiaoLiangbtn.height - 10 * _kscH)/2, 10 * _kscW, 10 * _kscH)];
    _xiaoLiangimageView.layer.borderColor = [[UIColor redColor]CGColor];
    _xiaoLiangimageView.layer.borderWidth = 1;
    _xiaoLiangimageView.image = [UIImage imageNamed:@"buttom"];
    [_xiaoLiangbtn addSubview:_xiaoLiangimageView];
    
    [self addSubview:_xiaoLiangbtn];
    
    _jiaGeBtn = [[UIButton alloc]initWithFrame:CGRectMake(_xiaoLiangbtn.right, 0, KScreenWidth/3, self.height)];
    
    [_jiaGeBtn setTitle:@"价格" forState:UIControlStateNormal];
    _jiaGeBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [_jiaGeBtn setTitleColor:MaintextColor forState:UIControlStateNormal];

   _jiaGeimageView = [[UIImageView alloc]initWithFrame:CGRectMake(_zongHeBtn.center.x + 20 * _kscW,( _jiaGeBtn.height - 10 * _kscH)/2, 10 * _kscW, 10 * _kscH)];
    
    _jiaGeimageView.image = [UIImage imageNamed:@"buttom"];
    [_jiaGeBtn addSubview:_jiaGeimageView];

    [self addSubview:_jiaGeBtn];
    
    _PingjiaBtn = [[UIButton alloc]initWithFrame:CGRectMake(_jiaGeBtn.right, 0, KScreenWidth/3, self.height)];
    [_PingjiaBtn setTitle:@"评价" forState:UIControlStateNormal];
    _PingjiaBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [_PingjiaBtn setTitleColor:MaintextColor forState:UIControlStateNormal];
    
    _pigJiaimageView = [[UIImageView alloc]initWithFrame:CGRectMake(_zongHeBtn.center.x + 20 * _kscW,( _PingjiaBtn.height - 10 * _kscH)/2, 10 * _kscW, 10 * _kscH)];
    //    _xiaoLiangimageView.backgroundColor = [UIColor redColor];
    _pigJiaimageView.image = [UIImage imageNamed:@"buttom"];
    [_PingjiaBtn addSubview:_pigJiaimageView];
    
    [self addSubview:_PingjiaBtn];
    
    UILabel *fenGeLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, self.height - 1, KScreenWidth, 1)];
    fenGeLabel.backgroundColor = LIGHTGRAYBACKCOLOR;
    [self addSubview:fenGeLabel];
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
